<template>
    <el-container>
        <el-main>
            <div class="title">
            <a href="http://hwdev.xiezixiansheng.com:9191" target="_blank"> 新窗口打开</a>
            </div>
            <div >
                <iframe  class="weditor" v-bind:src="url" v-loading="loading" frameborder="0" scrolling="no" ></iframe>
            </div>
        </el-main>
    </el-container>
</template>

<script>
// import {} from '../../api/autopay'; 
import axios from 'axios'
export default {
    name: 'Weditor',
    data(){
        return {
            url:"",
            html: '',
            loading: false,
        }
    },
    mounted () {
        this.url = 'http://hwdev.xiezixiansheng.com:9191';
        this.load(this.url)
    },
    methods: {
        Test(){
            console.timeStamp();
        },
        load (url) {
            if (url && url.length > 0) {
             // 加载中
                this.loading = true
                let param = {
                accept: 'text/html, text/plain'
                }
                axios.get(url, param).then((response) => {
                this.loading = false
                // 处理HTML显示
                this.html = response.data
                }).catch(() => {
                this.loading = false
                this.html = '加载失败'
                })
            }
       }
    }//methods
}
</script>

<style>
    .title{
        text-align: center;
        font-size: 50px;
        margin-bottom: 10px;
    }
    .weditor{
        background: #00ff00;
        height: 1080px;
        width: 1920px;
    }
</style>